package casbinRouter

import (
	"github.com/Sir-yuChen/funAnalyse/api"
	"github.com/Sir-yuChen/funAnalyse/global"
	"github.com/Sir-yuChen/funAnalyse/middleware"
	"github.com/gin-gonic/gin"
)

type StockCasbinRoleRelationUserRouter struct{}

func (co *StockCasbinRoleRelationUserRouter) StockCasbinRoleRelationUserApiRouter(Router *gin.RouterGroup) {
	commonJwtRouter := Router.Group(global.ROUTER_GROUP_CASBIN).Use(middleware.JWTAuth()).Use(middleware.CasbinMiddleware())
	api := api.ApiGroupApp.CasbinApiGroup.StockCasbinRoleRelationUserController
	{
		commonJwtRouter.GET(global.API_CASBIN_ROLE_RELATION_USER_GET.BasePath, middleware.CheckApiResourcesMiddleware(global.API_CASBIN_ROLE_RELATION_USER_GET), api.GetStockCasbinRoleRelationUser)
		commonJwtRouter.POST(global.API_CASBIN_ROLE_RELATION_USER_INSERT.BasePath, middleware.CheckApiResourcesMiddleware(global.API_CASBIN_ROLE_RELATION_USER_INSERT), api.InsertStockCasbinRoleRelationUser)
		commonJwtRouter.POST(global.API_CASBIN_ROLE_RELATION_USER_UPDATE.BasePath, middleware.CheckApiResourcesMiddleware(global.API_CASBIN_ROLE_RELATION_USER_UPDATE), api.UpdateStockCasbinRoleRelationUser)
		commonJwtRouter.GET(global.API_CASBIN_ROLE_RELATION_USER_UPDATE.BasePath, middleware.CheckApiResourcesMiddleware(global.API_CASBIN_ROLE_RELATION_USER_DEL), api.DelStockCasbinRoleRelationUser)
		commonJwtRouter.POST(global.API_CASBIN_ROLE_USER_ASSIGNINGROLE.BasePath, middleware.CheckApiResourcesMiddleware(global.API_CASBIN_ROLE_USER_ASSIGNINGROLE), api.AssigningRole)
	}
}
